#斐波那契
a,b=1,0
print("a是%d  b是%d"%(a,b))
print("a是{}，b是{}".format(a,b))
while b < 10 :
    print(b)
    a,b=b,a+b
# input_data=input("请输入一个数字")
# if int(input_data) in range(1,10) :
#     print("tt")
#循环

#方法挨打
#关键字参数
def d_fun(a,b):
    print(f"a是：{a}")
    print(f"b是：{b}")
d_fun(b=10,a=20)
def d_fun2(a,b=[1,2,3]):
    print(f"a是：{a}")
    print(f"b是：{b}")
d_fun2(2,[6,5,4])
def f(x):
    return x * x

# 参数可迭代对象Iterable(list) 给参数传给f()
r = map(f, [1, 2, 3, 4, 5, 6, 7, 8, 9])
listq = list(r)
print(listq,"----map")
def is_odd(n):
    return n % 2 == 1

a = filter(is_odd, [1, 2, 4, 5, 6, 9, 10, 15])
print(a)
# bv=lambda 'c':"2"==5
# print(str(bv))
#高阶函数
def funa():
    pass
def funb(a):
    pass
a=funa
funb(a)
def d_map(x):
    return int(x)+1
re_m=list(map(d_map,[1,2,3]))
print(re_m)